﻿@model IEnumerable<OrderIT.Model.Order>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            OrderDate
        </th>
        <th>
            Customer
        </th>
        <th>
            EstimatedShippingDate
        </th>
        <th>
            ActualShippingDate
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.OrderDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Customer.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EstimatedShippingDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ActualShippingDate)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.OrderId }) |
            @Html.ActionLink("Details", "Details", new { id=item.OrderId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.OrderId })
        </td>
    </tr>
}

</table>
